package database;


import org.junit.Test;
import java.util.List;

public class Test2 {

    private DeptDao deptDao = new DeptDaolmpl();  // 定义变量

    @Test
    public void testQueryEmpsDepts(){
        List<Dept> depts = deptDao.findDepts();
        for (Dept dept : depts) {
            System.out.println("部门名称："+dept.getDname());
            System.out.println("部门位置："+dept.getLoc());
            System.out.println("员工信息:");
            Emp empList = dept.getEmpList();
            System.out.println("empList.getEname() = " + empList.getEname());
        }
    }
}
